﻿@{
    ViewBag.Title = "购物车";
    Layout = "~/Views/Shared/_MainLayout.cshtml"; 
    var comboList= ViewBag.ComboList as List<LPY.LeHealth.DTO.Cart> ;
}

<div class="content">
    <div class="shopping">
        <ul class="shopping_nav">
            <li class="shopping_nav_on">
                <i>&nbsp;</i>
                <p><font>①</font>我的购物车</p>
                <em>&nbsp;</em>
            </li>
            <li>
                <i>&nbsp;</i>
                <p><font>②</font>填写核对订单</p>
                <em>&nbsp;</em>
            </li>
            <li>
                <i>&nbsp;</i>
                <p><font>③</font>成功提交订单</p>
                <em>&nbsp;</em>
            </li>
            <li class="s_nav_last">
                <p>
                    <font>④</font>
                    预约体检时间
                </p>
            </li>
        </ul>
        <div class="shopcarhead clearfix">
            <span class="slelect_all"></span>
            <input id="checkAll" type="checkbox" style="float: left; margin-left: 15px; margin-top: 11px; width: 15px; height: 15px;"  checked="checked">
            <p>全选<span>套餐</span><span>单价（元）</span><span>数量</span><span>小计</span><span>操作</span></p>
        </div>
        <div class="shopcarcontent">

            <div class="jigou">
                @*<div class="head">
                    <input type="checkbox" style="float: left; margin-left: 15px; margin-top: 11px; width: 15px; height: 15px;" class="select_g" checked="checked" data-companyid="YY201603091111450001">
                    <p>北京爱康国宾体检中心(白石体检分院)</p>
                </div>*@
                <div class="shopcontentlist clearfix">
                    <div class="yiyuanlist">
                        <div class="taocanlist">
                            @for (int i = 0; i < comboList.Count; i++)
                            {
                                <ul class="shopinfo clearfix">
                                <li class="btnandimg">
                                    <input type="checkbox" name="subBox" style="float: left; margin-top: 50px; margin-right: 20px; margin-left: 12px; width: 15px; height: 15px;" checked >
                                    <img src="~/Asset/tijian.png">
                                </li>
                                <li class="textcontent">
                                    <p><a href="@Url.Action("ComboDetail", "Home", new { id = comboList[i].Combo.Id })" target="_blank">@comboList[i].Combo.Hospital.Name</a> </p>
                                    <p><a href="@Url.Action("ComboDetail", "Home", new { id = comboList[i].Combo.Id })" target="_blank">@comboList[i].Combo.Name</a></p>
                                </li>
                                <li class="price">
                                    @*<del id="s_TC201607281332380034">2800.00</del><br>*@
                                    <span style="color: #fc6202;" >@Math.Round(comboList[i].Combo.Price,2)</span>
                                </li>
                                <li class="number">
                                    <a href="javascript:;" id="addnum" class="jian" >-</a>
                                    <input type="text" name="" class="numberone" id="number_TC201607281332380034" value="@comboList[i].Count" data-productid="TC201607281332380034" maxlength="3">
                                    <a href="javascript:;" id="rovmenum" class="jia" data-productid="TC201607281332380034">+</a>
                                </li>
                                <li class="count">
                                    <b id="xiaoji_TC201607281332380034">00</b>
                                </li>
                                <li class="del">
                                    <a class="deleteCarProduct" data-productid="TC201607281332380034" href="javascript:void(0)">删除</a>
                                </li>
                            </ul>
                            }
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div class="shopcarfooter clearfix">
            <p class="countchoose">已选择 <font id="lb_number">1</font>件</p>
            <a href="javascript:;" class="clearcar">清空购物车</a>
            <div class="tongji">
                <div class="text2">
                    <span class="price1">￥<b id="b_totalAccount">1498.00</b></span><br>
                    @*<span class="price2">￥<b id="i_priceSpread">1302.00</b></span>*@
                </div>
                <div class="text1">
                    <span>&nbsp;合计：</span><br>
                    @*<span>已节省：</span>*@
                </div>
            </div>

            <a href="javascript:void(0)" class="jiezhang" id="ToOrder">去结算</a>
            <span id="nullToOrder" class="jiezhang" style="display: none; background-color: #ccc;">去结算</span>
        </div>

    </div>

</div>

<script type="text/javascript">
    $(function () {
        //全选功能
        $("#checkAll").click(function () {
            $('input[name="subBox"]').prop("checked", this.checked);
        });
        var $subBox = $('input[name="subBox"]');
        $subBox.click(function () {
            $("#checkAll").prop("checked", $subBox.length == $("input[name='subBox']:checked").length ? true : false);
        });
    });
</script>
